<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
session.setAttribute("path",path);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <script type="text/javascript">
  function changImg(){
  	document.getElementById("authImg").src="authImg?timestep="+new Date().getTime();
  	}
  </script>
  
 <style type="text/css">
<!--
#login {
	position:absolute;
	width:312px;
	height:956px;
	z-index:1;
	left: 600px;
	top: 300px;
}
-->
</style>
  <body>
  	<div id="login">
	  	<form action="login.action">
			用户名:<input type="text" name="user.userName"><br/>
			密   码:<input type="text" name="user.userPassword"><br/>
			验证码:<input type="text" name="randImgStr" /><br/>
			<img alt="看不清楚，请点击" src="${pageContext.request.contextPath}/authImg" id="authImg" name="authImg" onclick="changImg()"><div style="display: inline;"><font color="red">${requestScope.error }</font></div>
			<center><input type="submit" value="登录"/></center>
			<a href="${sessionScope.path}/jsp/register.jsp">注册用户</a>
		</form>	
	</div>
  </body>
</html>
